]> dgit.raspbian.org Git - gnome-shell.git/commit
status/bluetooth: Use promise to initialize proxy
authorFlorian Müllner <fmuellner@gnome.org>
Fri, 29 Jul 2022 10:57:50 +0000 (12:57 +0200)
committerMarge Bot <marge-bot@gnome.org>
Mon, 1 Aug 2022 12:33:35 +0000 (12:33 +0000)
commit463757569a9c235d6dd19492f533cd8cbc89b6ed
tree721d88cce81ccdec2622eeb53d75d68cc2cafc3e
parent80e4ae7d7f996361b77f1e20d1553d3c2a7d1cc2
status/bluetooth: Use promise to initialize proxy

There's no good reason for waiting for the proxy to be initialized
to connect signals. In fact, connecting the signal beforehand
ensures that the handler is in place when the proxy fetches the
properties, so we don't have to call the handler explicitly.

That in turn allows us to rely on the signal parameters to only process
changed properties.

To achieve that, construct the proxy manually, and then initialize
it asynchronously in a Promise.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2391>
js/ui/status/bluetooth.js